<!DOCTYPE html>
<html>
	<#include "/common/head.html" />
<body id="jQUi" class="cssfont">
	<div class="layout">
		<div id="download_tip_warp"></div>
		<div id="content">
		<div id="index" class="panel fade in" selected="true" data-load="pageIndexLoad" data-unload="pageIndexUnload" style="display: block;">
		<#include "/common/header.html" />
		<div class="focus-picture">
			<span class="ui-icon-loading spin"></span>
				<ul class="slider fix" id="focus-picture-slider">
					<#list action.adSlides as slide>
						<li><img src="${basePath!}${slide.image_path!}" href="${slide.href!}" url="" class="slider_logo" width="640px" height="320px"></li>
					</#list>
				</ul>
			<div id="focus-picture-dot" class="slider-dot fix"><span class=""></span><span class=""></span><span class=""></span><span class="hover"></span><span class=""></span><span class=""></span></div>
		</div>
		<script type="text/javascript" charset="utf-8">
			
			$(document).ready(function(){
				var slider = null, sliderID = 'focus-picture-slider';
				slider = new $.ui.Slider(sliderID, 'focus-picture-dot');
				slider.start();
				
				// 1. 获取对象 2. 遍历节点 3. 绑定事件
				$('.slider_logo').bind('click',function(){
					var href = $(this).attr("href");
					window.location.href=href;
				});
			});
			$('.slides_control').removeAttr('style');
		</script>
	
		<div class="core">
			<#list action.ranks as r>
				<div class="titbits-warp">
					<div class="titbits">
						<p class="tit-title">
							<label>${r.name!}</label>
							<label class="tit_right" href="${basePath!}/more?rid=${r.id!}">更多</label>
						</p>
					</div>
				</div>
				<#assign games = action.getGames(r.id)>
				<div class="channel fix" id="index_channel">
				<#list games.list as g>
				<!-- 游戏列表 start -->
					<div class="channel-list">
						<div class="pic-shadow">
							<span class="view" href="${basePath!}/detail?gid=${g.game_id!}">
								<img src="${basePath!}${g.icon_path!}" alt="${g.game_name!}">
							</span>
						</div>
						<div class="name"><span class="view" href="${basePath!}/detail/index?gid=${g.game_id!}">${g.game_name!}</span></div>
					</div>	
				<!-- 游戏列表 end -->
				</#list>
				</div>
				<div class="clear"></div>
			</#list>
		</div>
			<#include "/common/footer.html" />
		</div>			
	</div>
</div>
		<script type="text/javascript">
			$('.tit_right').bind('click', function(e){
				var href = $(this).attr("href");
				window.location.href=href;
			});
		</script>
</body></html>